{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=274
  Verdict: Accepted
}
var a,b,c,x,y:longint;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(x,y,a,b,c);
if a*x+b*y+c=0 then write('YES') else write('NO');
end.